package com.aco.party.security.token;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * Created by WangShijun on 2016/5/21.
 */
public class OpenIdAuthenticationToken extends UsernamePasswordToken {

    private String openId;

    private String username;

    public OpenIdAuthenticationToken(String openId, String username,String password) {
        this.openId = openId;
        this.username = username;
        this.setPassword(password.toCharArray());
    }

    public OpenIdAuthenticationToken() {
    }

    @Override
    public Object getPrincipal() {
        return username;
    }

    @Override
    public Object getCredentials() {
        return openId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
